﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Clmp.Data.DBEntity2
{
    /// <summary>
    /// 事务上下文（线程单例模式）
    /// </summary>
    internal class TransactionContext
    {
        [ThreadStaticAttribute] 
        private IDbConnection _connection;
        public IDbConnection Connection
        {
            get { return _connection; }
            internal set { _connection = value; }
        }

        [ThreadStaticAttribute] 
        private IDbTransaction _transaction;
        public IDbTransaction Transaction
        {
            get { return _transaction; }
            internal set { _transaction = value;}
        }
    }
}
